/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainFrm.java
 *
 * Created on May 5, 2010, 9:57:20 AM
 */
package com.aptech.childcare.gui;

import com.aptech.childcare.buz.ChildcareBuz;
import com.aptech.childcare.components.ColumnData;
import com.aptech.childcare.components.LookAndFeel;
import com.aptech.childcare.components.ObjectTableModel;
import com.aptech.childcare.entities.Activities;
import com.aptech.childcare.entities.Agegroup;
import com.aptech.childcare.entities.Child;
import com.aptech.childcare.entities.ClassChild;
import com.aptech.childcare.entities.Nanny;
import com.aptech.childcare.entities.Staff;
import java.awt.Image;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;

/**
 *
 * @author BaoTien
 */
public class MainFrm extends javax.swing.JFrame {

    /** Creates new form MainFrm */
    MainFrm main;
    private ChildcareBuz buz = new ChildcareBuz();
    private ObjectTableModel tableModel;
    private ArrayList<Activities> act = new ArrayList<Activities>();
    private ArrayList<Agegroup> age = new ArrayList<Agegroup>();
    private ArrayList<ClassChild> cl = new ArrayList<ClassChild>();
    private ArrayList<Nanny> na = new ArrayList<Nanny>();
    private ArrayList<Child> ch = new ArrayList<Child>();
    private ArrayList<Staff> st = new ArrayList<Staff>();
    int comfirm = 0, id = 0;
    int idAge = 0, idCl = 0, idNa = 0, idCh = 0, idCla = 0, idSt = 0;
    public int idna;
    String userName;
    String url = "image\\";
    // Table's headers
    private JTable headerTable;
    // Index of the selected row
    int index = -1;
    private ClassChild classChild = null;
    private Activities activities = null;
    private Agegroup agegroup = null;
    private Child child = null;
    private Nanny nanny = null;
    private Staff staff = null;
    private int childSize;

    public MainFrm() throws IOException {
        /**
         *
         */
        ImageIcon icon = new ImageIcon(getClass().getResource("../icon/logo.png"));
        Image image = icon.getImage();
        setIconImage(image);

        initComponents();
        act = buz.findlActivities();
        loadtableActivities();
        age = buz.findAgegroup();
        loadtableAgegroup();
        cl = buz.findClass();
        loadtableClass();
        na = buz.findNanny();
        loadtableNanny();
        ch = buz.findChild();
        loadtableChild();
        st = buz.findStaff();
        loadtableStaff();
        loadtableChildClass();
        loadtableChildAgegroup();
        setEnabled();
        /**
         *
         */
        classChild = new ClassChild();
        tbClass.getSelectionModel().setSelectionInterval(0, 0);
        if (cl.size() != 0) {

            ch = buz.findByAllIDChild(cl.get(0).getClassID());
            loadtableChildClass();
            childSize = ch.size();
            setValueClass(cl.get(0));
        }
        /**
         *
         */
        activities = new Activities();
        tbActivities.getSelectionModel().setSelectionInterval(0, 0);
        if (act.size() != 0) {
            setValueActivities(act.get(0));
        }
        /**
         *
         */
        agegroup = new Agegroup();
        tbAgegroup.getSelectionModel().setSelectionInterval(0, 0);
        if (age.size() != 0) {
            ch = buz.findByAllIDChild(buz.readByIDAge(age.get(0).getAgeGroupID()).getClassID());
            loadtableChildAgegroup();
            childSize = ch.size();
            setValueAgegroup(age.get(0));
        }
        /**
         *
         */
        nanny = new Nanny();
        tbNanny.getSelectionModel().setSelectionInterval(0, 0);
        if (na.size() != 0) {
            setValueNanny(na.get(0));
        }
        /**
         *
         */
        child = new Child();
        tbChild.getSelectionModel().setSelectionInterval(0, 0);
        if (ch.size() != 0) {
            setValueChild(ch.get(0));
        }
        /**
         *
         */
        staff = new Staff();
        tbStaff.getSelectionModel().setSelectionInterval(0, 0);
        if (st.size() != 0) {
            setValueStaff(st.get(0));

        }
        setLocationRelativeTo(null);
    }

    /**
     * 
     */
    public void loadtableActivities() {
        //act = buz.findlActivities();
        ColumnData[] columns = {
            new ColumnData("Name", 100, SwingConstants.LEFT, 2),
            new ColumnData("Fees", 20, SwingConstants.LEFT, 3),};
        tableModel = new ObjectTableModel(tbActivities, columns, act);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbActivities.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        tbActivities.updateUI();

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        scrActivities.setRowHeader(viewport);
        scrActivities.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
        scrActivities.updateUI();

    }

    /**
     * 
     */
    public void loadtableNanny() {
        //na = buz.findNanny();
        ColumnData[] columns = {
            new ColumnData("Name", 100, SwingConstants.LEFT, 2),
            new ColumnData("Charge", 20, SwingConstants.LEFT, 9),};
        tableModel = new ObjectTableModel(tbNanny, columns, na);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbNanny.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        scrNanny.setRowHeader(viewport);
        scrNanny.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     *
     */
    public void loadtableAgegroup() {
        //age = buz.findAgegroup();
        ColumnData[] columns = {
            new ColumnData("Age Group", 100, SwingConstants.LEFT, 2),
            new ColumnData("Fees", 20, SwingConstants.LEFT, 3),};
        tableModel = new ObjectTableModel(tbAgegroup, columns, age);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbAgegroup.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        srcAgegroup.setRowHeader(viewport);
        srcAgegroup.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     * 
     */
    public void loadtableClass() {
        // cl = buz.findClass();
        ColumnData[] columns = {
            new ColumnData("Name", 50, SwingConstants.LEFT, 2),
            new ColumnData("Agegroup ID", 50, SwingConstants.LEFT, 3),};
        tableModel = new ObjectTableModel(tbClass, columns, cl);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbClass.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        scrClass.setRowHeader(viewport);
        scrClass.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     *
     */
    public void loadtableStaff() {
        // st = buz.findStaff();
        ColumnData[] columns = {
            new ColumnData("Name", 100, SwingConstants.LEFT, 3),
            new ColumnData("StartDate", 20, SwingConstants.LEFT, 11)
        };
        tableModel = new ObjectTableModel(tbStaff, columns, st);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbStaff.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        scrStaff.setRowHeader(viewport);
        scrStaff.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     *
     */
    public void loadtableChild() {
        // ch = buz.findChild();
        ColumnData[] columns = {
            new ColumnData("Name", 50, SwingConstants.LEFT, 2),
            new ColumnData("", 10, SwingConstants.LEFT, 3),
            new ColumnData("Registration", 50, SwingConstants.LEFT, 17),};
        tableModel = new ObjectTableModel(tbChild, columns, ch);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbChild.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());

        scrChild.setRowHeader(viewport);
        scrChild.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     *
     */
    public void loadtableChildClass() {
        ColumnData[] columns = {
            new ColumnData("LastName", 50, SwingConstants.LEFT, 2),
            new ColumnData("FirstName", 30, SwingConstants.LEFT, 3),
            new ColumnData("Sex", 10, SwingConstants.LEFT, 4),
            new ColumnData("Birthday", 20, SwingConstants.LEFT, 6),
            new ColumnData("Address", 100, SwingConstants.LEFT, 7),
            new ColumnData("PartenName", 100, SwingConstants.LEFT, 11),
            new ColumnData("PartenPhone", 50, SwingConstants.LEFT, 12),
            new ColumnData("Registration", 50, SwingConstants.LEFT, 17),
            new ColumnData("DateReceived", 50, SwingConstants.LEFT, 18),};
        tableModel = new ObjectTableModel(tbChildClass, columns, ch);
        //tableModel = new ObjectTableModel(tbChildActivities, columns, ch);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        tbChildClass.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        //tbChildActivities.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());
        scrChildClass.setRowHeader(viewport);
        scrChildClass.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
        // srcChildActivities.setRowHeader(viewport);
        // srcChildActivities.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
    }

    /**
     *
     */
    public void loadtableChildAgegroup() {
        ColumnData[] columns = {
            new ColumnData("LastName", 50, SwingConstants.LEFT, 2),
            new ColumnData("FirstName", 30, SwingConstants.LEFT, 3),
            new ColumnData("Sex", 10, SwingConstants.LEFT, 4),
            new ColumnData("Birthday", 20, SwingConstants.LEFT, 6),
            new ColumnData("Address", 100, SwingConstants.LEFT, 7),
            new ColumnData("PartenName", 100, SwingConstants.LEFT, 11),
            new ColumnData("PartenPhone", 50, SwingConstants.LEFT, 12),
            new ColumnData("Registration", 50, SwingConstants.LEFT, 17),
            new ColumnData("DateReceived", 50, SwingConstants.LEFT, 18),};
        // tableModel = new ObjectTableModel(tbChildClass, columns, ch);
        tableModel = new ObjectTableModel(tbAgegroupChild, columns, ch);
        headerTable = tableModel.getHeaderTable();

        // Create numbering column
        headerTable.createDefaultColumnsFromModel();
        // tbChildClass.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        tbAgegroupChild.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        // Put it in a viewport that we can control a bit
        JViewport viewport = new JViewport();

        // Display numbering column
        viewport.setView(headerTable);
        viewport.setPreferredSize(headerTable.getMaximumSize());
        //scrChildClass.setRowHeader(viewport);
        //scrChildClass.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
        scrAgegroupChild.setRowHeader(viewport);
        scrActivitiesChild.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, headerTable.getTableHeader());
        new LookAndFeel(this);

    }

    /**
     *
     * @param cls
     */
    public void setValueClass(ClassChild cls) throws IOException {
        idCl = cls.getClassID();
        lbClassID.setText("" + cls.getClassID());
        lbClassName.setText(cls.getName());
        lbAgegroupIDCl.setText(buz.findByIDAge(cls.getAgeGroupID()).getAgeGroup());
        lbClassChildNumber.setText(String.valueOf(childSize));
        if (cls.getNote() != null) {
            lbClassNote.setText(cls.getNote());
        } else {
            lbClassNote.setText("");
        }
    }

    /**
     *
     * @param ac
     */
    public void setValueActivities(Activities ac) {
        id = ac.getActiveID();
        lbActivitiesID.setText("" + ac.getActiveID());
        lbActivitiesName.setText(ac.getName());
        lbActivitiesFees.setText("" + ac.getFees());
        lbActivitiesNote.setText(ac.getNote());
    }

    /**
     *
     * @param ag
     */
    public void setValueAgegroup(Agegroup ag) {
        idAge = ag.getAgeGroupID();
        lbAgegroupID.setText("" + ag.getAgeGroupID());
        lbAgegroup.setText(ag.getAgeGroup());
        lbAgegroupFees.setText("" + ag.getFees());
        lbAgegroupChildN.setText(String.valueOf(childSize));
        lbAgegroupNote.setText(ag.getNote());
    }

    /**
     *
     * @param nan
     */
    public void setValueNanny(Nanny nan) throws IOException {
        idNa = nan.getNannyID();
        lbNameNanny.setText(nan.getFullName());
        lbAddressNanny.setText(nan.getAddress());
        lbBirthdayNanny.setText(String.valueOf(nan.getBirthday()));
        lbChargeNanny.setText(String.valueOf(nan.getCharge()));
        lbEmailNanny.setText(nan.getEmail());
        lbImageNanny.setIcon(new ImageIcon(url + nan.getPathImage()));
        lbPhoneNanny.setText(nan.getPhone());
        lbSexNanny.setText(nan.getSex());
        lbclassrom.setText(buz.findByID(nan.getClassID()).getName());
        lbWorkinghours.setText(String.valueOf(nan.getWorkinghours()));
        lbStartdate.setText(String.valueOf(nan.getStartDay()));
    }

    /**
     *
     * @param chi
     */
    public void setValueChild(Child chi) throws IOException {
        idCh = chi.getChildID();
        lbLastName.setText(chi.getLastName());
        lbFisrtName.setText(chi.getFirstName());
        lbImageChild.setIcon(new ImageIcon(url + chi.getPathImage()));
        lbBirthdayChild.setText(String.valueOf(chi.getBirthday()));
        lbAddressChild.setText(chi.getAddress());
        lbRegistrationDate.setText(String.valueOf(chi.getRegistrationDate()));
        lbSexChild.setText(chi.getSex());
        lbChildID.setText(String.valueOf(chi.getChildID()));
        lbClassroomChild.setText(buz.findByID(chi.getClassID()).getName());

    }

    /**
     *
     * @param sta
     */
    public void setValueStaff(Staff sta) {
        idSt = sta.getStaffID();
        userName = sta.getUserName();
        lbUserName.setText(sta.getUserName());
        lbNaneStaff.setText(sta.getFullName());
        lbSexStaff.setText(sta.getSex());
        lbPhoneStaff.setText(sta.getPhone());
        lbAddressStaff.setText(sta.getAddress());
        lbImageStaff.setIcon(new ImageIcon(url + sta.getPathImage()));
        lbEmailStaff.setText(sta.getEmail());
        lbBirthdayStaff.setText(String.valueOf(sta.getBirthday()));
        lbPosition.setText(sta.getPosition());
        lbStartDateStaff.setText(String.valueOf(sta.getStartDate()));
        lbEndDateStaff.setText(String.valueOf(sta.getEndDate()));
    }

    /**
     *
     */
    private void resetValueClass() {
        txtSetAgegroupIDOfClass.setText("");
        txtClassName.setText("");
        txtaNoteClass.setText(null);
    }

    /**
     *
     */
    private void resetValueActivities() {
        txtActivitiesName.setText("");
        txtActivitiesFees.setText("");
        txtaNoteActivities.setText(null);
    }

    /**
     *
     */
    private void resetValueAgegroup() {
        txtAgegroupName.setText("");
        txtAgegroupFees.setText("");
        txtaNoteAgegroup.setText(null);
    }

    /**
     *
     */
    private void setEnabled() {
        btnAddStaff.setEnabled(false);
        btnAddChild.setEnabled(false);
        btnAddNanny.setEnabled(false);
        btnEditclass.setEnabled(false);
        btnEdit.setEnabled(false);
        btnEditActivities.setEnabled(false);
        btnEditChild.setEnabled(false);
        btnEditNanny.setEnabled(false);
        btnEditStaff.setEnabled(false);
        btnSaveActivities.setEnabled(false);
        btnSaveAgegroup.setEnabled(false);
        btnSaveClass.setEnabled(false);
        btnDelete.setEnabled(false);
        btnDeleteActivities.setEnabled(false);
        btnDeleteChild.setEnabled(false);
        btnDeleteClass.setEnabled(false);
        btnDeleteStaff.setEnabled(false);
        btnDeleteNanny.setEnabled(false);
        btnSetAct.setEnabled(false);
        itmChangePass.setEnabled(false);
        itmDataConnection.setEnabled(false);
        itmChangePass.setEnabled(false);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        tbpContent = new javax.swing.JTabbedPane();
        PnlStaff = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        txtSearchStaff = new javax.swing.JTextField();
        btnSearchStaff = new javax.swing.JButton();
        scrStaff = new javax.swing.JScrollPane();
        tbStaff = new javax.swing.JTable();
        jPanel20 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jCalendar2 = new com.toedter.calendar.JCalendar();
        jPanel35 = new javax.swing.JPanel();
        lbImageStaff = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        lbUserName = new javax.swing.JLabel();
        lbNaneStaff = new javax.swing.JLabel();
        lbPhoneStaff = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        lbStartDateStaff = new javax.swing.JLabel();
        lbSexStaff = new javax.swing.JLabel();
        lbPosition = new javax.swing.JLabel();
        lbEmailStaff = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lbEndDateStaff = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        lbBirthdayStaff = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        lbAddressStaff = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        btnAddStaff = new javax.swing.JButton();
        btnEditStaff = new javax.swing.JButton();
        btnDeleteStaff = new javax.swing.JButton();
        PnlChild = new javax.swing.JPanel();
        leftPnl = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        txtSearchChild = new javax.swing.JTextField();
        btnSearchChild = new javax.swing.JButton();
        scrChild = new javax.swing.JScrollPane();
        tbChild = new javax.swing.JTable();
        jPanel29 = new javax.swing.JPanel();
        jLabel94 = new javax.swing.JLabel();
        jCalendar6 = new com.toedter.calendar.JCalendar();
        jPanel6 = new javax.swing.JPanel();
        btnDetailChild = new javax.swing.JButton();
        btnAddChild = new javax.swing.JButton();
        btnEditChild = new javax.swing.JButton();
        btnDeleteChild = new javax.swing.JButton();
        btnSetAct = new javax.swing.JButton();
        jPanel42 = new javax.swing.JPanel();
        lbImageChild = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        jLabel51 = new javax.swing.JLabel();
        lbAddressChild = new javax.swing.JLabel();
        lbLastName = new javax.swing.JLabel();
        lbBirthdayChild = new javax.swing.JLabel();
        lbSexChild = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jLabel99 = new javax.swing.JLabel();
        lbRegistrationDate = new javax.swing.JLabel();
        lbFisrtName = new javax.swing.JLabel();
        lbChildID = new javax.swing.JLabel();
        lbClassroomChild = new javax.swing.JLabel();
        jPanel49 = new javax.swing.JPanel();
        scrActivitiesChild = new javax.swing.JScrollPane();
        tbActivitiesChild = new javax.swing.JTable();
        jLabel130 = new javax.swing.JLabel();
        PnlNanny = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        txtSearchNanny = new javax.swing.JTextField();
        btnSearchNanny = new javax.swing.JButton();
        scrNanny = new javax.swing.JScrollPane();
        tbNanny = new javax.swing.JTable();
        jPanel27 = new javax.swing.JPanel();
        jLabel57 = new javax.swing.JLabel();
        jCalendar5 = new com.toedter.calendar.JCalendar();
        jPanel38 = new javax.swing.JPanel();
        lbImageNanny = new javax.swing.JLabel();
        jLabel60 = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        jLabel62 = new javax.swing.JLabel();
        lbclassrom = new javax.swing.JLabel();
        lbNameNanny = new javax.swing.JLabel();
        lbPhoneNanny = new javax.swing.JLabel();
        jLabel78 = new javax.swing.JLabel();
        jLabel79 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        jLabel81 = new javax.swing.JLabel();
        lbWorkinghours = new javax.swing.JLabel();
        lbSexNanny = new javax.swing.JLabel();
        lbChargeNanny = new javax.swing.JLabel();
        lbEmailNanny = new javax.swing.JLabel();
        jLabel88 = new javax.swing.JLabel();
        lbBirthdayNanny = new javax.swing.JLabel();
        jLabel90 = new javax.swing.JLabel();
        lbAddressNanny = new javax.swing.JLabel();
        jLabel92 = new javax.swing.JLabel();
        lbStartdate = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        btnAddNanny = new javax.swing.JButton();
        btnEditNanny = new javax.swing.JButton();
        btnDeleteNanny = new javax.swing.JButton();
        PnlClass = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        txtSearchClass = new javax.swing.JTextField();
        btnSearchClass = new javax.swing.JButton();
        scrClass = new javax.swing.JScrollPane();
        tbClass = new javax.swing.JTable();
        jPanel36 = new javax.swing.JPanel();
        jLabel117 = new javax.swing.JLabel();
        jCalendar8 = new com.toedter.calendar.JCalendar();
        jPanel9 = new javax.swing.JPanel();
        jLabel118 = new javax.swing.JLabel();
        jLabel119 = new javax.swing.JLabel();
        jLabel120 = new javax.swing.JLabel();
        jLabel121 = new javax.swing.JLabel();
        lbClassID = new javax.swing.JLabel();
        lbClassName = new javax.swing.JLabel();
        lbAgegroupIDCl = new javax.swing.JLabel();
        lbClassChildNumber = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        btnEditclass = new javax.swing.JButton();
        btnDeleteClass = new javax.swing.JButton();
        jLabel28 = new javax.swing.JLabel();
        lbClassNote = new javax.swing.JLabel();
        jPanel48 = new javax.swing.JPanel();
        scrChildClass = new javax.swing.JScrollPane();
        tbChildClass = new javax.swing.JTable();
        jLabel126 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jLabel127 = new javax.swing.JLabel();
        jLabel128 = new javax.swing.JLabel();
        txtClassName = new javax.swing.JTextField();
        txtSetAgegroupIDOfClass = new javax.swing.JTextField();
        btnSetAgegroup = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        btnSaveClass = new javax.swing.JButton();
        btnResetClass = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtaNoteClass = new javax.swing.JTextArea();
        PnlAgegroup = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        txtSearchAgegroup = new javax.swing.JTextField();
        btnSearchAgegroup = new javax.swing.JButton();
        srcAgegroup = new javax.swing.JScrollPane();
        tbAgegroup = new javax.swing.JTable();
        jPanel25 = new javax.swing.JPanel();
        jLabel55 = new javax.swing.JLabel();
        jCalendar4 = new com.toedter.calendar.JCalendar();
        jPanel7 = new javax.swing.JPanel();
        jLabel70 = new javax.swing.JLabel();
        jLabel71 = new javax.swing.JLabel();
        jLabel72 = new javax.swing.JLabel();
        jLabel73 = new javax.swing.JLabel();
        lbAgegroupID = new javax.swing.JLabel();
        lbAgegroup = new javax.swing.JLabel();
        lbAgegroupFees = new javax.swing.JLabel();
        lbAgegroupChildN = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        btnEdit = new javax.swing.JButton();
        btnDelete = new javax.swing.JButton();
        jLabel16 = new javax.swing.JLabel();
        lbAgegroupNote = new javax.swing.JLabel();
        jPanel46 = new javax.swing.JPanel();
        scrAgegroupChild = new javax.swing.JScrollPane();
        tbAgegroupChild = new javax.swing.JTable();
        jLabel65 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel56 = new javax.swing.JLabel();
        jLabel68 = new javax.swing.JLabel();
        txtAgegroupName = new javax.swing.JTextField();
        txtAgegroupFees = new javax.swing.JTextField();
        jPanel18 = new javax.swing.JPanel();
        btnSaveAgegroup = new javax.swing.JButton();
        btnResetAgegroup = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtaNoteAgegroup = new javax.swing.JTextArea();
        PnlActivities = new javax.swing.JPanel();
        jPanel30 = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        txtSearchActive = new javax.swing.JTextField();
        btnSearchActive = new javax.swing.JButton();
        scrActivities = new javax.swing.JScrollPane();
        tbActivities = new javax.swing.JTable();
        jPanel32 = new javax.swing.JPanel();
        jLabel104 = new javax.swing.JLabel();
        jCalendar7 = new com.toedter.calendar.JCalendar();
        jPanel8 = new javax.swing.JPanel();
        jLabel105 = new javax.swing.JLabel();
        jLabel106 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        lbActivitiesNote = new javax.swing.JLabel();
        lbActivitiesName = new javax.swing.JLabel();
        lbActivitiesFees = new javax.swing.JLabel();
        lbActivitiesChild = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        btnEditActivities = new javax.swing.JButton();
        btnDeleteActivities = new javax.swing.JButton();
        lbActivitiesID = new javax.swing.JLabel();
        jLabel109 = new javax.swing.JLabel();
        jPanel47 = new javax.swing.JPanel();
        srcChildActivities = new javax.swing.JScrollPane();
        tbChildActivities = new javax.swing.JTable();
        jLabel113 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        txtActivitiesName = new javax.swing.JTextField();
        txtActivitiesFees = new javax.swing.JTextField();
        jPanel37 = new javax.swing.JPanel();
        btnSaveActivities = new javax.swing.JButton();
        btnResetActivitiesl = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtaNoteActivities = new javax.swing.JTextArea();
        jLabel10 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        lbThu = new javax.swing.JLabel();
        lbOnline = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnSystem = new javax.swing.JMenu();
        itmLogin = new javax.swing.JMenuItem();
        itmChangePass = new javax.swing.JMenuItem();
        itmEditInformation = new javax.swing.JMenuItem();
        itmDataConnection = new javax.swing.JMenuItem();
        itmExit = new javax.swing.JMenuItem();
        mnManagement = new javax.swing.JMenu();
        itmManangementStaff = new javax.swing.JMenuItem();
        itmManagementChild = new javax.swing.JMenuItem();
        itmManagementNanny = new javax.swing.JMenuItem();
        itmManagementClass = new javax.swing.JMenuItem();
        itmManagamentAgegroup = new javax.swing.JMenuItem();
        itmManagementActivities = new javax.swing.JMenuItem();
        itmManagementReport = new javax.swing.JMenuItem();
        helpMn = new javax.swing.JMenu();
        itmHelp = new javax.swing.JMenuItem();
        itmAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Childcare management System");
        setFocusTraversalPolicyProvider(true);
        setMinimumSize(new java.awt.Dimension(1020, 725));

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255)));
        jPanel1.setPreferredSize(new java.awt.Dimension(1020, 615));

        jPanel15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        jPanel15.setPreferredSize(new java.awt.Dimension(200, 600));
        jPanel15.setLayout(new java.awt.GridBagLayout());

        txtSearchStaff.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchStaffKeyPressed(evt);
            }
        });

        btnSearchStaff.setText("Search");
        btnSearchStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchStaffActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchStaff, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchStaff)
                .addContainerGap())
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchStaff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchStaff))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 35;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel15.add(jPanel19, gridBagConstraints);

        tbStaff.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbStaff.setMinimumSize(new java.awt.Dimension(225, 128));
        tbStaff.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbStaffMouseReleased(evt);
            }
        });
        scrStaff.setViewportView(tbStaff);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 193;
        gridBagConstraints.ipady = 67;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        jPanel15.add(scrStaff, gridBagConstraints);

        jPanel20.setBackground(new java.awt.Color(204, 204, 255));

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel4.setText("Staff List");

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 65;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel15.add(jPanel20, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel15.add(jCalendar2, gridBagConstraints);

        jPanel35.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel35.setLayout(new java.awt.GridBagLayout());

        lbImageStaff.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbImageStaff.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbImageStaff.setMaximumSize(new java.awt.Dimension(100, 100));
        lbImageStaff.setMinimumSize(new java.awt.Dimension(100, 100));
        lbImageStaff.setPreferredSize(new java.awt.Dimension(100, 100));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(22, 19, 22, 6);
        jPanel35.add(lbImageStaff, gridBagConstraints);

        jLabel13.setText("User Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(jLabel13, gridBagConstraints);

        jLabel14.setText(" Name ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(jLabel14, gridBagConstraints);

        jLabel15.setText("Phone ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(jLabel15, gridBagConstraints);

        lbUserName.setText("U");
        lbUserName.setMaximumSize(new java.awt.Dimension(200, 15));
        lbUserName.setMinimumSize(new java.awt.Dimension(200, 15));
        lbUserName.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbUserName, gridBagConstraints);

        lbNaneStaff.setText("N");
        lbNaneStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbNaneStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbNaneStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbNaneStaff, gridBagConstraints);

        lbPhoneStaff.setText("P");
        lbPhoneStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbPhoneStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbPhoneStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbPhoneStaff, gridBagConstraints);

        jLabel20.setText("Start Date");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(jLabel20, gridBagConstraints);

        jLabel21.setText("Sex");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel35.add(jLabel21, gridBagConstraints);

        jLabel22.setText("Position");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel35.add(jLabel22, gridBagConstraints);

        jLabel23.setText("Email");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel35.add(jLabel23, gridBagConstraints);

        lbStartDateStaff.setText("S");
        lbStartDateStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbStartDateStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbStartDateStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbStartDateStaff, gridBagConstraints);

        lbSexStaff.setText("S");
        lbSexStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbSexStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbSexStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbSexStaff, gridBagConstraints);

        lbPosition.setText("P");
        lbPosition.setMaximumSize(new java.awt.Dimension(200, 15));
        lbPosition.setMinimumSize(new java.awt.Dimension(200, 15));
        lbPosition.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbPosition, gridBagConstraints);

        lbEmailStaff.setText("E");
        lbEmailStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbEmailStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbEmailStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbEmailStaff, gridBagConstraints);

        jLabel3.setText("End date");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel35.add(jLabel3, gridBagConstraints);

        lbEndDateStaff.setText("E");
        lbEndDateStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbEndDateStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbEndDateStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbEndDateStaff, gridBagConstraints);

        jLabel6.setText("Birthday");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel35.add(jLabel6, gridBagConstraints);

        lbBirthdayStaff.setText("B");
        lbBirthdayStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbBirthdayStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbBirthdayStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbBirthdayStaff, gridBagConstraints);

        jLabel8.setText("Address");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(jLabel8, gridBagConstraints);

        lbAddressStaff.setText("A");
        lbAddressStaff.setMaximumSize(new java.awt.Dimension(200, 15));
        lbAddressStaff.setMinimumSize(new java.awt.Dimension(200, 15));
        lbAddressStaff.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel35.add(lbAddressStaff, gridBagConstraints);

        btnAddStaff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnAddStaff.setText("Add");
        btnAddStaff.setMaximumSize(new java.awt.Dimension(85, 25));
        btnAddStaff.setMinimumSize(new java.awt.Dimension(85, 25));
        btnAddStaff.setPreferredSize(new java.awt.Dimension(85, 25));
        btnAddStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddStaffActionPerformed(evt);
            }
        });
        jPanel4.add(btnAddStaff);

        btnEditStaff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEditStaff.setText("Edit");
        btnEditStaff.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEditStaff.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEditStaff.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEditStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditStaffActionPerformed(evt);
            }
        });
        jPanel4.add(btnEditStaff);

        btnDeleteStaff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDeleteStaff.setText("Delete");
        btnDeleteStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteStaffActionPerformed(evt);
            }
        });
        jPanel4.add(btnDeleteStaff);

        javax.swing.GroupLayout PnlStaffLayout = new javax.swing.GroupLayout(PnlStaff);
        PnlStaff.setLayout(PnlStaffLayout);
        PnlStaffLayout.setHorizontalGroup(
            PnlStaffLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlStaffLayout.createSequentialGroup()
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlStaffLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel35, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)))
        );
        PnlStaffLayout.setVerticalGroup(
            PnlStaffLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlStaffLayout.createSequentialGroup()
                .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
        );

        tbpContent.addTab("Staffs", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Customers24x24.png")), PnlStaff); // NOI18N

        PnlChild.setVerifyInputWhenFocusTarget(false);

        leftPnl.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        leftPnl.setPreferredSize(new java.awt.Dimension(200, 600));
        leftPnl.setLayout(new java.awt.GridBagLayout());

        txtSearchChild.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchChildKeyPressed(evt);
            }
        });

        btnSearchChild.setText("Search");
        btnSearchChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchChildActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchChild, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchChild)
                .addContainerGap())
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchChild, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchChild))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 22;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        leftPnl.add(jPanel28, gridBagConstraints);

        tbChild.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbChild.setMinimumSize(new java.awt.Dimension(225, 128));
        tbChild.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbChildMouseReleased(evt);
            }
        });
        scrChild.setViewportView(tbChild);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 158;
        gridBagConstraints.ipady = 85;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        leftPnl.add(scrChild, gridBagConstraints);

        jPanel29.setBackground(new java.awt.Color(204, 204, 255));

        jLabel94.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel94.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel94.setText("Child List");

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel94, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel94, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 110;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        leftPnl.add(jPanel29, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 14;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        leftPnl.add(jCalendar6, gridBagConstraints);

        btnDetailChild.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/detail.png"))); // NOI18N
        btnDetailChild.setText("Detail");
        btnDetailChild.setMaximumSize(new java.awt.Dimension(85, 25));
        btnDetailChild.setMinimumSize(new java.awt.Dimension(85, 25));
        btnDetailChild.setPreferredSize(new java.awt.Dimension(85, 25));
        btnDetailChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDetailChildActionPerformed(evt);
            }
        });
        jPanel6.add(btnDetailChild);

        btnAddChild.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnAddChild.setText("Add");
        btnAddChild.setMaximumSize(new java.awt.Dimension(85, 25));
        btnAddChild.setMinimumSize(new java.awt.Dimension(85, 25));
        btnAddChild.setPreferredSize(new java.awt.Dimension(85, 25));
        btnAddChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddChildActionPerformed(evt);
            }
        });
        jPanel6.add(btnAddChild);

        btnEditChild.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEditChild.setText("Edit");
        btnEditChild.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEditChild.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEditChild.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEditChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditChildActionPerformed(evt);
            }
        });
        jPanel6.add(btnEditChild);

        btnDeleteChild.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDeleteChild.setText("Delete");
        btnDeleteChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteChildActionPerformed(evt);
            }
        });
        jPanel6.add(btnDeleteChild);

        btnSetAct.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/accept.png"))); // NOI18N
        btnSetAct.setText("Set Activities");
        btnSetAct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSetActActionPerformed(evt);
            }
        });
        jPanel6.add(btnSetAct);

        jPanel42.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel42.setPreferredSize(new java.awt.Dimension(0, 0));
        jPanel42.setLayout(new java.awt.GridBagLayout());

        lbImageChild.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbImageChild.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbImageChild.setMaximumSize(new java.awt.Dimension(100, 100));
        lbImageChild.setMinimumSize(new java.awt.Dimension(100, 100));
        lbImageChild.setPreferredSize(new java.awt.Dimension(100, 100));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 8);
        jPanel42.add(lbImageChild, gridBagConstraints);

        jLabel48.setText("Address");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(jLabel48, gridBagConstraints);

        jLabel49.setText("Sex ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 18, 10, 13);
        jPanel42.add(jLabel49, gridBagConstraints);

        jLabel50.setText("LastName ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(jLabel50, gridBagConstraints);

        jLabel51.setText("Birthday  ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(jLabel51, gridBagConstraints);

        lbAddressChild.setText("S");
        lbAddressChild.setMaximumSize(new java.awt.Dimension(200, 15));
        lbAddressChild.setMinimumSize(new java.awt.Dimension(200, 15));
        lbAddressChild.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbAddressChild, gridBagConstraints);

        lbLastName.setText("N");
        lbLastName.setMaximumSize(new java.awt.Dimension(200, 15));
        lbLastName.setMinimumSize(new java.awt.Dimension(200, 15));
        lbLastName.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbLastName, gridBagConstraints);

        lbBirthdayChild.setText("B");
        lbBirthdayChild.setMaximumSize(new java.awt.Dimension(200, 15));
        lbBirthdayChild.setMinimumSize(new java.awt.Dimension(200, 15));
        lbBirthdayChild.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbBirthdayChild, gridBagConstraints);

        lbSexChild.setText("S");
        lbSexChild.setMaximumSize(new java.awt.Dimension(200, 15));
        lbSexChild.setMinimumSize(new java.awt.Dimension(200, 15));
        lbSexChild.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbSexChild, gridBagConstraints);

        jLabel96.setText("Registration Date");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 18, 10, 13);
        jPanel42.add(jLabel96, gridBagConstraints);

        jLabel97.setText("FirstName");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 18, 10, 13);
        jPanel42.add(jLabel97, gridBagConstraints);

        jLabel98.setText("Child ID");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(jLabel98, gridBagConstraints);

        jLabel99.setText("Classroom");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 18, 10, 13);
        jPanel42.add(jLabel99, gridBagConstraints);

        lbRegistrationDate.setText("R");
        lbRegistrationDate.setMaximumSize(new java.awt.Dimension(200, 15));
        lbRegistrationDate.setMinimumSize(new java.awt.Dimension(200, 15));
        lbRegistrationDate.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbRegistrationDate, gridBagConstraints);

        lbFisrtName.setText("H");
        lbFisrtName.setMaximumSize(new java.awt.Dimension(200, 15));
        lbFisrtName.setMinimumSize(new java.awt.Dimension(200, 15));
        lbFisrtName.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbFisrtName, gridBagConstraints);

        lbChildID.setText("A");
        lbChildID.setMaximumSize(new java.awt.Dimension(200, 15));
        lbChildID.setMinimumSize(new java.awt.Dimension(200, 15));
        lbChildID.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbChildID, gridBagConstraints);

        lbClassroomChild.setText("C");
        lbClassroomChild.setMaximumSize(new java.awt.Dimension(200, 15));
        lbClassroomChild.setMinimumSize(new java.awt.Dimension(200, 15));
        lbClassroomChild.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 13, 10, 13);
        jPanel42.add(lbClassroomChild, gridBagConstraints);

        jPanel49.setBackground(new java.awt.Color(204, 204, 255));
        jPanel49.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        tbActivitiesChild.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "LastName", "FirstName", "Sex", "Birthday", "Age Group", "RegistrationDate"
            }
        ));
        tbActivitiesChild.setMinimumSize(new java.awt.Dimension(225, 128));
        scrActivitiesChild.setViewportView(tbActivitiesChild);

        jLabel130.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel130.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel130.setText(" Child list");

        javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49);
        jPanel49.setLayout(jPanel49Layout);
        jPanel49Layout.setHorizontalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scrActivitiesChild, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE)
            .addGroup(jPanel49Layout.createSequentialGroup()
                .addComponent(jLabel130, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(685, Short.MAX_VALUE))
        );
        jPanel49Layout.setVerticalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel49Layout.createSequentialGroup()
                .addComponent(jLabel130, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scrActivitiesChild, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout PnlChildLayout = new javax.swing.GroupLayout(PnlChild);
        PnlChild.setLayout(PnlChildLayout);
        PnlChildLayout.setHorizontalGroup(
            PnlChildLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlChildLayout.createSequentialGroup()
                .addComponent(leftPnl, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlChildLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                    .addComponent(jPanel42, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)))
        );
        PnlChildLayout.setVerticalGroup(
            PnlChildLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(leftPnl, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlChildLayout.createSequentialGroup()
                .addComponent(jPanel42, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tbpContent.addTab("Childs", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/logo.png")), PnlChild); // NOI18N

        jPanel17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        jPanel17.setPreferredSize(new java.awt.Dimension(200, 600));
        jPanel17.setLayout(new java.awt.GridBagLayout());

        txtSearchNanny.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchNannyKeyPressed(evt);
            }
        });

        btnSearchNanny.setText("Search");
        btnSearchNanny.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchNannyActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchNanny, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchNanny)
                .addContainerGap())
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchNanny, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchNanny))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 55;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel17.add(jPanel26, gridBagConstraints);

        tbNanny.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        tbNanny.setMinimumSize(new java.awt.Dimension(225, 128));
        tbNanny.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbNannyMouseReleased(evt);
            }
        });
        scrNanny.setViewportView(tbNanny);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 158;
        gridBagConstraints.ipady = 91;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        jPanel17.add(scrNanny, gridBagConstraints);

        jPanel27.setBackground(new java.awt.Color(204, 204, 255));

        jLabel57.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel57.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel57.setText("Nanny List");

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel57, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(41, Short.MAX_VALUE))
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel57, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 78;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel17.add(jPanel27, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 47;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel17.add(jCalendar5, gridBagConstraints);

        jPanel38.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel38.setLayout(new java.awt.GridBagLayout());

        lbImageNanny.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbImageNanny.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbImageNanny.setMaximumSize(new java.awt.Dimension(100, 100));
        lbImageNanny.setMinimumSize(new java.awt.Dimension(100, 100));
        lbImageNanny.setPreferredSize(new java.awt.Dimension(100, 100));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(22, 19, 22, 6);
        jPanel38.add(lbImageNanny, gridBagConstraints);

        jLabel60.setText("Classroom");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(jLabel60, gridBagConstraints);

        jLabel61.setText(" Name ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(jLabel61, gridBagConstraints);

        jLabel62.setText("Phone ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(jLabel62, gridBagConstraints);

        lbclassrom.setText("U");
        lbclassrom.setMaximumSize(new java.awt.Dimension(200, 15));
        lbclassrom.setMinimumSize(new java.awt.Dimension(200, 15));
        lbclassrom.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbclassrom, gridBagConstraints);

        lbNameNanny.setText("N");
        lbNameNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbNameNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbNameNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbNameNanny, gridBagConstraints);

        lbPhoneNanny.setText("P");
        lbPhoneNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbPhoneNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbPhoneNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbPhoneNanny, gridBagConstraints);

        jLabel78.setText("Workinghours");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(jLabel78, gridBagConstraints);

        jLabel79.setText("Sex");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel38.add(jLabel79, gridBagConstraints);

        jLabel80.setText("Charge");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel38.add(jLabel80, gridBagConstraints);

        jLabel81.setText("Email");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel38.add(jLabel81, gridBagConstraints);

        lbWorkinghours.setText("S");
        lbWorkinghours.setMaximumSize(new java.awt.Dimension(200, 15));
        lbWorkinghours.setMinimumSize(new java.awt.Dimension(200, 15));
        lbWorkinghours.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbWorkinghours, gridBagConstraints);

        lbSexNanny.setText("S");
        lbSexNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbSexNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbSexNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbSexNanny, gridBagConstraints);

        lbChargeNanny.setText("P");
        lbChargeNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbChargeNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbChargeNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbChargeNanny, gridBagConstraints);

        lbEmailNanny.setText("E");
        lbEmailNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbEmailNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbEmailNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbEmailNanny, gridBagConstraints);

        jLabel88.setText("Birthday");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel38.add(jLabel88, gridBagConstraints);

        lbBirthdayNanny.setText("B");
        lbBirthdayNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbBirthdayNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbBirthdayNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbBirthdayNanny, gridBagConstraints);

        jLabel90.setText("Address");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(jLabel90, gridBagConstraints);

        lbAddressNanny.setText("A");
        lbAddressNanny.setMaximumSize(new java.awt.Dimension(200, 15));
        lbAddressNanny.setMinimumSize(new java.awt.Dimension(200, 15));
        lbAddressNanny.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbAddressNanny, gridBagConstraints);

        jLabel92.setText("Start Date");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 15, 13, 10);
        jPanel38.add(jLabel92, gridBagConstraints);

        lbStartdate.setText("E");
        lbStartdate.setMaximumSize(new java.awt.Dimension(200, 15));
        lbStartdate.setMinimumSize(new java.awt.Dimension(200, 15));
        lbStartdate.setPreferredSize(new java.awt.Dimension(200, 15));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 10, 13, 10);
        jPanel38.add(lbStartdate, gridBagConstraints);

        btnAddNanny.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnAddNanny.setText("Add");
        btnAddNanny.setMaximumSize(new java.awt.Dimension(85, 25));
        btnAddNanny.setMinimumSize(new java.awt.Dimension(85, 25));
        btnAddNanny.setPreferredSize(new java.awt.Dimension(85, 25));
        btnAddNanny.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddNannyActionPerformed(evt);
            }
        });
        jPanel5.add(btnAddNanny);

        btnEditNanny.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEditNanny.setText("Edit");
        btnEditNanny.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEditNanny.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEditNanny.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEditNanny.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditNannyActionPerformed(evt);
            }
        });
        jPanel5.add(btnEditNanny);

        btnDeleteNanny.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDeleteNanny.setText("Delete");
        btnDeleteNanny.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteNannyActionPerformed(evt);
            }
        });
        jPanel5.add(btnDeleteNanny);

        javax.swing.GroupLayout PnlNannyLayout = new javax.swing.GroupLayout(PnlNanny);
        PnlNanny.setLayout(PnlNannyLayout);
        PnlNannyLayout.setHorizontalGroup(
            PnlNannyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlNannyLayout.createSequentialGroup()
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlNannyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)))
        );
        PnlNannyLayout.setVerticalGroup(
            PnlNannyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlNannyLayout.createSequentialGroup()
                .addComponent(jPanel38, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
        );

        tbpContent.addTab("Nannies", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/woman24x24.png")), PnlNanny); // NOI18N

        PnlClass.setVerifyInputWhenFocusTarget(false);

        jPanel33.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        jPanel33.setPreferredSize(new java.awt.Dimension(200, 600));
        jPanel33.setLayout(new java.awt.GridBagLayout());

        txtSearchClass.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchClassKeyPressed(evt);
            }
        });

        btnSearchClass.setText("Search");
        btnSearchClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchClassActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchClass, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchClass)
                .addContainerGap())
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchClass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchClass))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 22;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel33.add(jPanel34, gridBagConstraints);

        tbClass.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbClass.setMinimumSize(new java.awt.Dimension(225, 128));
        tbClass.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbClassMouseReleased(evt);
            }
        });
        scrClass.setViewportView(tbClass);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 158;
        gridBagConstraints.ipady = 107;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        jPanel33.add(scrClass, gridBagConstraints);

        jPanel36.setBackground(new java.awt.Color(204, 204, 255));

        jLabel117.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel117.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel117.setText("Class List");

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel117, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel117, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 109;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel33.add(jPanel36, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 14;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel33.add(jCalendar8, gridBagConstraints);

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel9.setLayout(new java.awt.GridBagLayout());

        jLabel118.setText("Class ID");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(jLabel118, gridBagConstraints);

        jLabel119.setText("Class Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(jLabel119, gridBagConstraints);

        jLabel120.setText("Agegroup");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(jLabel120, gridBagConstraints);

        jLabel121.setText("Child Number");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(jLabel121, gridBagConstraints);

        lbClassID.setMaximumSize(new java.awt.Dimension(100, 14));
        lbClassID.setMinimumSize(new java.awt.Dimension(100, 14));
        lbClassID.setPreferredSize(new java.awt.Dimension(100, 14));
        lbClassID.setRequestFocusEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(lbClassID, gridBagConstraints);

        lbClassName.setMaximumSize(new java.awt.Dimension(100, 14));
        lbClassName.setMinimumSize(new java.awt.Dimension(100, 14));
        lbClassName.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(lbClassName, gridBagConstraints);

        lbAgegroupIDCl.setMaximumSize(new java.awt.Dimension(100, 14));
        lbAgegroupIDCl.setMinimumSize(new java.awt.Dimension(100, 14));
        lbAgegroupIDCl.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(lbAgegroupIDCl, gridBagConstraints);

        lbClassChildNumber.setMaximumSize(new java.awt.Dimension(100, 14));
        lbClassChildNumber.setMinimumSize(new java.awt.Dimension(100, 14));
        lbClassChildNumber.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(lbClassChildNumber, gridBagConstraints);

        btnEditclass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEditclass.setText("Edit");
        btnEditclass.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEditclass.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEditclass.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEditclass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditclassActionPerformed(evt);
            }
        });
        jPanel14.add(btnEditclass);

        btnDeleteClass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDeleteClass.setText("Delete");
        btnDeleteClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteClassActionPerformed(evt);
            }
        });
        jPanel14.add(btnDeleteClass);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
        jPanel9.add(jPanel14, gridBagConstraints);

        jLabel28.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(jLabel28, gridBagConstraints);

        lbClassNote.setMinimumSize(new java.awt.Dimension(100, 14));
        lbClassNote.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel9.add(lbClassNote, gridBagConstraints);

        jPanel48.setBackground(new java.awt.Color(204, 204, 255));
        jPanel48.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        tbChildClass.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "LastName", "FirstName", "Sex", "Birthday", "Age Group", "RegistrationDate"
            }
        ));
        tbChildClass.setMinimumSize(new java.awt.Dimension(225, 128));
        scrChildClass.setViewportView(tbChildClass);

        jLabel126.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel126.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel126.setText(" Child list");

        javax.swing.GroupLayout jPanel48Layout = new javax.swing.GroupLayout(jPanel48);
        jPanel48.setLayout(jPanel48Layout);
        jPanel48Layout.setHorizontalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel48Layout.createSequentialGroup()
                .addComponent(jLabel126, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(685, Short.MAX_VALUE))
            .addComponent(scrChildClass, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE)
        );
        jPanel48Layout.setVerticalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel48Layout.createSequentialGroup()
                .addComponent(jLabel126, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scrChildClass, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
        );

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Add Class", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel16.setPreferredSize(new java.awt.Dimension(250, 266));
        jPanel16.setLayout(new java.awt.GridBagLayout());

        jLabel127.setText("Class Name ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(jLabel127, gridBagConstraints);

        jLabel128.setText("Agegroup ID");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(jLabel128, gridBagConstraints);

        txtClassName.setColumns(15);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(txtClassName, gridBagConstraints);

        txtSetAgegroupIDOfClass.setColumns(10);
        txtSetAgegroupIDOfClass.setEditable(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(txtSetAgegroupIDOfClass, gridBagConstraints);

        btnSetAgegroup.setText("set");
        btnSetAgegroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSetAgegroupActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        jPanel16.add(btnSetAgegroup, gridBagConstraints);

        btnSaveClass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnSaveClass.setText("Save");
        btnSaveClass.setMaximumSize(new java.awt.Dimension(85, 25));
        btnSaveClass.setMinimumSize(new java.awt.Dimension(85, 25));
        btnSaveClass.setPreferredSize(new java.awt.Dimension(85, 25));
        btnSaveClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveClassActionPerformed(evt);
            }
        });
        jPanel3.add(btnSaveClass);

        btnResetClass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Cancel-2-16x16.png"))); // NOI18N
        btnResetClass.setText("Reset");
        btnResetClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetClassActionPerformed(evt);
            }
        });
        jPanel3.add(btnResetClass);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
        jPanel16.add(jPanel3, gridBagConstraints);

        jLabel12.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(jLabel12, gridBagConstraints);

        txtaNoteClass.setColumns(24);
        txtaNoteClass.setRows(3);
        jScrollPane3.setViewportView(txtaNoteClass);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel16.add(jScrollPane3, gridBagConstraints);

        javax.swing.GroupLayout PnlClassLayout = new javax.swing.GroupLayout(PnlClass);
        PnlClass.setLayout(PnlClassLayout);
        PnlClassLayout.setHorizontalGroup(
            PnlClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlClassLayout.createSequentialGroup()
                .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PnlClassLayout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, 473, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel48, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        PnlClassLayout.setVerticalGroup(
            PnlClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel33, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlClassLayout.createSequentialGroup()
                .addGroup(PnlClassLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel16, 0, 0, Short.MAX_VALUE)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 249, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel48, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tbpContent.addTab("Class", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Class.png")), PnlClass); // NOI18N

        jPanel23.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        jPanel23.setPreferredSize(new java.awt.Dimension(200, 600));
        jPanel23.setLayout(new java.awt.GridBagLayout());

        txtSearchAgegroup.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchAgegroupKeyPressed(evt);
            }
        });

        btnSearchAgegroup.setText("Search");
        btnSearchAgegroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchAgegroupActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
        jPanel24.setLayout(jPanel24Layout);
        jPanel24Layout.setHorizontalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchAgegroup, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchAgegroup)
                .addContainerGap())
        );
        jPanel24Layout.setVerticalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchAgegroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchAgegroup))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 22;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel23.add(jPanel24, gridBagConstraints);

        tbAgegroup.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        tbAgegroup.setMinimumSize(new java.awt.Dimension(225, 128));
        tbAgegroup.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbAgegroupMouseReleased(evt);
            }
        });
        srcAgegroup.setViewportView(tbAgegroup);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 158;
        gridBagConstraints.ipady = 118;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        jPanel23.add(srcAgegroup, gridBagConstraints);

        jPanel25.setBackground(new java.awt.Color(204, 204, 255));

        jLabel55.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel55.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel55.setText("Agegroup List");

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 75;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel23.add(jPanel25, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 14;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel23.add(jCalendar4, gridBagConstraints);

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel7.setMinimumSize(new java.awt.Dimension(229, 259));
        jPanel7.setPreferredSize(new java.awt.Dimension(229, 259));
        jPanel7.setLayout(new java.awt.GridBagLayout());

        jLabel70.setText("Age Group ID");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(jLabel70, gridBagConstraints);

        jLabel71.setText("Age Group");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(jLabel71, gridBagConstraints);

        jLabel72.setText("Fees");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(jLabel72, gridBagConstraints);

        jLabel73.setText("Child Number");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(jLabel73, gridBagConstraints);

        lbAgegroupID.setMaximumSize(new java.awt.Dimension(100, 14));
        lbAgegroupID.setMinimumSize(new java.awt.Dimension(100, 14));
        lbAgegroupID.setPreferredSize(new java.awt.Dimension(100, 14));
        lbAgegroupID.setRequestFocusEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(lbAgegroupID, gridBagConstraints);

        lbAgegroup.setMaximumSize(new java.awt.Dimension(100, 14));
        lbAgegroup.setMinimumSize(new java.awt.Dimension(100, 14));
        lbAgegroup.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(lbAgegroup, gridBagConstraints);

        lbAgegroupFees.setMaximumSize(new java.awt.Dimension(100, 14));
        lbAgegroupFees.setMinimumSize(new java.awt.Dimension(100, 14));
        lbAgegroupFees.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(lbAgegroupFees, gridBagConstraints);

        lbAgegroupChildN.setMaximumSize(new java.awt.Dimension(100, 14));
        lbAgegroupChildN.setMinimumSize(new java.awt.Dimension(100, 14));
        lbAgegroupChildN.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(lbAgegroupChildN, gridBagConstraints);

        btnEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEdit.setText("Edit");
        btnEdit.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEdit.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEdit.setOpaque(false);
        btnEdit.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditActionPerformed(evt);
            }
        });
        jPanel10.add(btnEdit);

        btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDelete.setText("Delete");
        btnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActionPerformed(evt);
            }
        });
        jPanel10.add(btnDelete);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
        jPanel7.add(jPanel10, gridBagConstraints);

        jLabel16.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(jLabel16, gridBagConstraints);

        lbAgegroupNote.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel7.add(lbAgegroupNote, gridBagConstraints);

        jPanel46.setBackground(new java.awt.Color(204, 204, 255));
        jPanel46.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        tbAgegroupChild.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "LastName", "FirstName", "Sex", "Birthday", "Age Group", "RegistrationDate"
            }
        ));
        tbAgegroupChild.setMinimumSize(new java.awt.Dimension(225, 128));
        scrAgegroupChild.setViewportView(tbAgegroupChild);

        jLabel65.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel65.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel65.setText(" Child list");

        javax.swing.GroupLayout jPanel46Layout = new javax.swing.GroupLayout(jPanel46);
        jPanel46.setLayout(jPanel46Layout);
        jPanel46Layout.setHorizontalGroup(
            jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel46Layout.createSequentialGroup()
                .addComponent(jLabel65, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(685, Short.MAX_VALUE))
            .addComponent(scrAgegroupChild, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE)
        );
        jPanel46Layout.setVerticalGroup(
            jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel46Layout.createSequentialGroup()
                .addComponent(jLabel65, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scrAgegroupChild, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Add Age Group", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel11.setPreferredSize(new java.awt.Dimension(250, 266));
        jPanel11.setLayout(new java.awt.GridBagLayout());

        jLabel56.setText("Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(jLabel56, gridBagConstraints);

        jLabel68.setText("Fees");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(jLabel68, gridBagConstraints);

        txtAgegroupName.setColumns(15);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(txtAgegroupName, gridBagConstraints);

        txtAgegroupFees.setColumns(15);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(txtAgegroupFees, gridBagConstraints);

        btnSaveAgegroup.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnSaveAgegroup.setText("Save");
        btnSaveAgegroup.setMaximumSize(new java.awt.Dimension(85, 25));
        btnSaveAgegroup.setMinimumSize(new java.awt.Dimension(85, 25));
        btnSaveAgegroup.setPreferredSize(new java.awt.Dimension(85, 25));
        btnSaveAgegroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveAgegroupActionPerformed(evt);
            }
        });
        jPanel18.add(btnSaveAgegroup);

        btnResetAgegroup.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Cancel-2-16x16.png"))); // NOI18N
        btnResetAgegroup.setText("Reset");
        btnResetAgegroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetAgegroupActionPerformed(evt);
            }
        });
        jPanel18.add(btnResetAgegroup);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.insets = new java.awt.Insets(6, 0, 6, 0);
        jPanel11.add(jPanel18, gridBagConstraints);

        jLabel11.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(jLabel11, gridBagConstraints);

        txtaNoteAgegroup.setColumns(24);
        txtaNoteAgegroup.setRows(3);
        txtaNoteAgegroup.setTabSize(5);
        jScrollPane2.setViewportView(txtaNoteAgegroup);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel11.add(jScrollPane2, gridBagConstraints);

        javax.swing.GroupLayout PnlAgegroupLayout = new javax.swing.GroupLayout(PnlAgegroup);
        PnlAgegroup.setLayout(PnlAgegroupLayout);
        PnlAgegroupLayout.setHorizontalGroup(
            PnlAgegroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlAgegroupLayout.createSequentialGroup()
                .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlAgegroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PnlAgegroupLayout.createSequentialGroup()
                        .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, 473, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        PnlAgegroupLayout.setVerticalGroup(
            PnlAgegroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlAgegroupLayout.createSequentialGroup()
                .addGroup(PnlAgegroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel11, 0, 0, Short.MAX_VALUE)
                    .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, 249, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tbpContent.addTab("Agegroup", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/usermanager.png")), PnlAgegroup); // NOI18N

        PnlActivities.setVerifyInputWhenFocusTarget(false);

        jPanel30.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));
        jPanel30.setPreferredSize(new java.awt.Dimension(200, 600));
        jPanel30.setLayout(new java.awt.GridBagLayout());

        txtSearchActive.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchActiveKeyPressed(evt);
            }
        });

        btnSearchActive.setText("Search");
        btnSearchActive.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchActiveActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSearchActive, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(btnSearchActive)
                .addContainerGap())
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSearchActive, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSearchActive))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 22;
        gridBagConstraints.ipady = 45;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel30.add(jPanel31, gridBagConstraints);

        tbActivities.setBackground(new java.awt.Color(240, 240, 240));
        tbActivities.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        tbActivities.setMinimumSize(new java.awt.Dimension(225, 128));
        tbActivities.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tbActivitiesMouseReleased(evt);
            }
        });
        scrActivities.setViewportView(tbActivities);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 158;
        gridBagConstraints.ipady = 124;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);
        jPanel30.add(scrActivities, gridBagConstraints);

        jPanel32.setBackground(new java.awt.Color(204, 204, 255));

        jLabel104.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel104.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel104.setText("Activities List");

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 83;
        gridBagConstraints.ipady = 11;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        jPanel30.add(jPanel32, gridBagConstraints);

        jCalendar7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jCalendar7MouseClicked(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 14;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        jPanel30.add(jCalendar7, gridBagConstraints);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "View Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel8.setMaximumSize(new java.awt.Dimension(2147483647, 259));
        jPanel8.setLayout(new java.awt.GridBagLayout());

        jLabel105.setText("Activities ID");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(jLabel105, gridBagConstraints);

        jLabel106.setText("Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(jLabel106, gridBagConstraints);

        jLabel107.setText("Fees");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(jLabel107, gridBagConstraints);

        jLabel108.setText("Child Number");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(jLabel108, gridBagConstraints);

        lbActivitiesNote.setMaximumSize(new java.awt.Dimension(100, 14));
        lbActivitiesNote.setMinimumSize(new java.awt.Dimension(100, 14));
        lbActivitiesNote.setPreferredSize(new java.awt.Dimension(100, 14));
        lbActivitiesNote.setRequestFocusEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(lbActivitiesNote, gridBagConstraints);

        lbActivitiesName.setMaximumSize(new java.awt.Dimension(100, 14));
        lbActivitiesName.setMinimumSize(new java.awt.Dimension(100, 14));
        lbActivitiesName.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(lbActivitiesName, gridBagConstraints);

        lbActivitiesFees.setMaximumSize(new java.awt.Dimension(100, 14));
        lbActivitiesFees.setMinimumSize(new java.awt.Dimension(100, 14));
        lbActivitiesFees.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(lbActivitiesFees, gridBagConstraints);

        lbActivitiesChild.setMaximumSize(new java.awt.Dimension(100, 14));
        lbActivitiesChild.setMinimumSize(new java.awt.Dimension(100, 14));
        lbActivitiesChild.setPreferredSize(new java.awt.Dimension(100, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(lbActivitiesChild, gridBagConstraints);

        btnEditActivities.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        btnEditActivities.setText("Edit");
        btnEditActivities.setMaximumSize(new java.awt.Dimension(85, 25));
        btnEditActivities.setMinimumSize(new java.awt.Dimension(85, 25));
        btnEditActivities.setPreferredSize(new java.awt.Dimension(85, 25));
        btnEditActivities.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditActivitiesActionPerformed(evt);
            }
        });
        jPanel12.add(btnEditActivities);

        btnDeleteActivities.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/delete.png"))); // NOI18N
        btnDeleteActivities.setText("Delete");
        btnDeleteActivities.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActivitiesActionPerformed(evt);
            }
        });
        jPanel12.add(btnDeleteActivities);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
        jPanel8.add(jPanel12, gridBagConstraints);

        lbActivitiesID.setMaximumSize(new java.awt.Dimension(100, 14));
        lbActivitiesID.setMinimumSize(new java.awt.Dimension(100, 14));
        lbActivitiesID.setPreferredSize(new java.awt.Dimension(100, 14));
        lbActivitiesID.setRequestFocusEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(lbActivitiesID, gridBagConstraints);

        jLabel109.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(11, 13, 11, 13);
        jPanel8.add(jLabel109, gridBagConstraints);

        jPanel47.setBackground(new java.awt.Color(204, 204, 255));
        jPanel47.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        tbChildActivities.setBackground(new java.awt.Color(240, 240, 240));
        tbChildActivities.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "LastName", "FirstName", "Sex", "Birthday", "Age Group", "RegistrationDate"
            }
        ));
        tbChildActivities.setMinimumSize(new java.awt.Dimension(225, 128));
        srcChildActivities.setViewportView(tbChildActivities);

        jLabel113.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel113.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/nav_plain_green.png"))); // NOI18N
        jLabel113.setText(" Child list");

        javax.swing.GroupLayout jPanel47Layout = new javax.swing.GroupLayout(jPanel47);
        jPanel47.setLayout(jPanel47Layout);
        jPanel47Layout.setHorizontalGroup(
            jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel47Layout.createSequentialGroup()
                .addComponent(jLabel113, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(685, Short.MAX_VALUE))
            .addComponent(srcChildActivities, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE)
        );
        jPanel47Layout.setVerticalGroup(
            jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel47Layout.createSequentialGroup()
                .addComponent(jLabel113, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(srcChildActivities, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Add Activities", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14), new java.awt.Color(102, 102, 255))); // NOI18N
        jPanel13.setPreferredSize(new java.awt.Dimension(250, 266));
        jPanel13.setLayout(new java.awt.GridBagLayout());

        jLabel114.setText("Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(jLabel114, gridBagConstraints);

        jLabel115.setText("Fees");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(jLabel115, gridBagConstraints);

        txtActivitiesName.setColumns(15);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(txtActivitiesName, gridBagConstraints);

        txtActivitiesFees.setColumns(15);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(txtActivitiesFees, gridBagConstraints);

        btnSaveActivities.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/add.png"))); // NOI18N
        btnSaveActivities.setText("Save");
        btnSaveActivities.setMaximumSize(new java.awt.Dimension(85, 25));
        btnSaveActivities.setMinimumSize(new java.awt.Dimension(85, 25));
        btnSaveActivities.setPreferredSize(new java.awt.Dimension(85, 25));
        btnSaveActivities.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveActivitiesActionPerformed(evt);
            }
        });
        jPanel37.add(btnSaveActivities);

        btnResetActivitiesl.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Cancel-2-16x16.png"))); // NOI18N
        btnResetActivitiesl.setText("Reset");
        btnResetActivitiesl.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetActivitieslActionPerformed(evt);
            }
        });
        jPanel37.add(btnResetActivitiesl);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.insets = new java.awt.Insets(11, 0, 11, 0);
        jPanel13.add(jPanel37, gridBagConstraints);

        txtaNoteActivities.setColumns(24);
        txtaNoteActivities.setRows(3);
        txtaNoteActivities.setTabSize(10);
        jScrollPane1.setViewportView(txtaNoteActivities);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(jScrollPane1, gridBagConstraints);

        jLabel10.setText("Note");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
        jPanel13.add(jLabel10, gridBagConstraints);

        javax.swing.GroupLayout PnlActivitiesLayout = new javax.swing.GroupLayout(PnlActivities);
        PnlActivities.setLayout(PnlActivitiesLayout);
        PnlActivitiesLayout.setHorizontalGroup(
            PnlActivitiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PnlActivitiesLayout.createSequentialGroup()
                .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PnlActivitiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PnlActivitiesLayout.createSequentialGroup()
                        .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, 473, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        PnlActivitiesLayout.setVerticalGroup(
            PnlActivitiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel30, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)
            .addGroup(PnlActivitiesLayout.createSequentialGroup()
                .addGroup(PnlActivitiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel13, 0, 0, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 249, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tbpContent.addTab("Activities", new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/child.png")), PnlActivities); // NOI18N

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 255)));

        lbThu.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbThu.setText("Copyright 2010 of Little Angels");

        lbOnline.setText("No UserName");

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/online.png"))); // NOI18N
        jLabel2.setText("Online :");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(lbOnline, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(lbThu, javax.swing.GroupLayout.PREFERRED_SIZE, 806, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(lbOnline, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(lbThu, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/banner.png"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1011, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(tbpContent, javax.swing.GroupLayout.DEFAULT_SIZE, 991, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tbpContent, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
                .addGap(35, 35, 35))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap(648, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

        mnSystem.setText("System");
        mnSystem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSystemActionPerformed(evt);
            }
        });

        itmLogin.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
        itmLogin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/lock_add.png"))); // NOI18N
        itmLogin.setText("Login");
        itmLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmLoginActionPerformed(evt);
            }
        });
        mnSystem.add(itmLogin);

        itmChangePass.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        itmChangePass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/lock2.png"))); // NOI18N
        itmChangePass.setText("Change Password");
        itmChangePass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmChangePassActionPerformed(evt);
            }
        });
        mnSystem.add(itmChangePass);

        itmEditInformation.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        itmEditInformation.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/edit.png"))); // NOI18N
        itmEditInformation.setText("Edit Information");
        itmEditInformation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmEditInformationActionPerformed(evt);
            }
        });
        mnSystem.add(itmEditInformation);

        itmDataConnection.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        itmDataConnection.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/database_add.png"))); // NOI18N
        itmDataConnection.setText("Database to new connection");
        itmDataConnection.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmDataConnectionActionPerformed(evt);
            }
        });
        mnSystem.add(itmDataConnection);

        itmExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        itmExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/exit.png"))); // NOI18N
        itmExit.setText("Exit");
        itmExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmExitActionPerformed(evt);
            }
        });
        mnSystem.add(itmExit);

        jMenuBar1.add(mnSystem);

        mnManagement.setText("Management");

        itmManangementStaff.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, java.awt.event.InputEvent.CTRL_MASK));
        itmManangementStaff.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Customers.png"))); // NOI18N
        itmManangementStaff.setText("Management Staff");
        itmManangementStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManangementStaffActionPerformed(evt);
            }
        });
        mnManagement.add(itmManangementStaff);

        itmManagementChild.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, java.awt.event.InputEvent.CTRL_MASK));
        itmManagementChild.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/child16x16.png"))); // NOI18N
        itmManagementChild.setText("Management Child");
        itmManagementChild.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagementChildActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagementChild);

        itmManagementNanny.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3, java.awt.event.InputEvent.CTRL_MASK));
        itmManagementNanny.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/woman16x16.png"))); // NOI18N
        itmManagementNanny.setText("Management Nanny");
        itmManagementNanny.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagementNannyActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagementNanny);

        itmManagementClass.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4, java.awt.event.InputEvent.CTRL_MASK));
        itmManagementClass.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Class16x16.png"))); // NOI18N
        itmManagementClass.setText("Management Class");
        itmManagementClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagementClassActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagementClass);

        itmManagamentAgegroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5, java.awt.event.InputEvent.CTRL_MASK));
        itmManagamentAgegroup.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/usermanager16x16.png"))); // NOI18N
        itmManagamentAgegroup.setText("Management Age-group");
        itmManagamentAgegroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagamentAgegroupActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagamentAgegroup);

        itmManagementActivities.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6, java.awt.event.InputEvent.CTRL_MASK));
        itmManagementActivities.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/child16x16.png"))); // NOI18N
        itmManagementActivities.setText("Management Activities");
        itmManagementActivities.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagementActivitiesActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagementActivities);

        itmManagementReport.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7, java.awt.event.InputEvent.CTRL_MASK));
        itmManagementReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/export16x16.png"))); // NOI18N
        itmManagementReport.setText("Management Report");
        itmManagementReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmManagementReportActionPerformed(evt);
            }
        });
        mnManagement.add(itmManagementReport);

        jMenuBar1.add(mnManagement);

        helpMn.setText("Help");

        itmHelp.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        itmHelp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/Help16x16.png"))); // NOI18N
        itmHelp.setText("Help");
        itmHelp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmHelpActionPerformed(evt);
            }
        });
        helpMn.add(itmHelp);

        itmAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
        itmAbout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/childcare/icon/about.png"))); // NOI18N
        itmAbout.setText("About");
        helpMn.add(itmAbout);

        jMenuBar1.add(helpMn);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void itmChangePassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmChangePassActionPerformed
        // TODO add your handling code here:
        ChangePassDlg change = new ChangePassDlg(main, true);
        change.txtUseName.setText(lbOnline.getText());
        change.setVisible(true);
}//GEN-LAST:event_itmChangePassActionPerformed

    private void itmExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmExitActionPerformed
        int choice = JOptionPane.showConfirmDialog(this, "Are you exit?", "Exit",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (choice == JOptionPane.YES_OPTION) {
            this.dispose();
        }
}//GEN-LAST:event_itmExitActionPerformed

    private void itmHelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmHelpActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_itmHelpActionPerformed

    private void btnAddStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddStaffActionPerformed
        try {
            // TODO add your handling code here:
            AddStaffDlg addsta = new AddStaffDlg(main, true);
            addsta.setVisible(true);
            st = buz.findStaff();
            loadtableStaff();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnAddStaffActionPerformed

    private void btnEditStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditStaffActionPerformed
        try {
            // TODO add your handling code here:
            EditStaffDlg editsta = new EditStaffDlg(main, true);
            index = this.tbStaff.getSelectedRow();
            if (index == -1) {
                JOptionPane.showMessageDialog(this, "Please choose a Staff!");
                return;
            }
            staff = st.get(index);
            editsta.txtStaffID.setText(String.valueOf(staff.getStaffID()));
            editsta.txtName.setText(staff.getFullName());
            editsta.txtAddress.setText(staff.getAddress());
            editsta.txtEmail.setText(staff.getEmail());
            editsta.txtPhone.setText(staff.getPhone());
            editsta.cbSex.setSelectedItem(staff.getSex());
            editsta.cbPostion.setSelectedItem(staff.getPosition());
            editsta.lbImage.setIcon(new ImageIcon(url + staff.getPathImage()));
            editsta.dcBirthday.setDate(staff.getBirthday());
            editsta.dcStartDate.setDate(staff.getStartDate());
            editsta.dcEndDate.setDate(staff.getEndDate());
            editsta.setVisible(true);
            st = buz.findStaff();
            loadtableStaff();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }

}//GEN-LAST:event_btnEditStaffActionPerformed

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        // TODO add your handling code here:
        index = this.tbAgegroup.getSelectedRow();
        if (index == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Agegroup!");
            return;
        }
        index = this.tbAgegroup.getSelectedRow();
        agegroup = age.get(index);
        txtAgegroupName.setText(agegroup.getAgeGroup());
        txtAgegroupFees.setText(String.valueOf(agegroup.getFees()));
        txtaNoteAgegroup.setText(agegroup.getNote());
}//GEN-LAST:event_btnEditActionPerformed

    private void btnSaveAgegroupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveAgegroupActionPerformed
        try {
            // TODO add your handling code here:
            Agegroup ag = new Agegroup();
            if (txtAgegroupName.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter Name.");
                txtAgegroupName.requestFocus();
                return;
            }
            if (txtAgegroupFees.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter Fees.");
                txtAgegroupFees.requestFocus();
                return;
            }
            ag.setAgeGroupID(agegroup.getAgeGroupID());
            ag.setAgeGroup(txtAgegroupName.getText());
            ag.setFees(Float.parseFloat(txtAgegroupFees.getText()));
            ag.setNote(txtaNoteAgegroup.getText());
            if (ag.getAgeGroupID() == -1) {
                try {
                    if (buz.createAgegroup(ag)) {
                        JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                    } else {
                        JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                    }
                } catch (IOException ex) {
                    Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                if (buz.storeAgegroup(ag)) {
                    JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                } else {
                    JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                }
            }
            age = buz.findAgegroup();
            loadtableAgegroup();
            resetValueAgegroup();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }

    }//GEN-LAST:event_btnSaveAgegroupActionPerformed

    private void btnResetAgegroupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResetAgegroupActionPerformed
        // TODO add your handling code here:
        resetValueAgegroup();
}//GEN-LAST:event_btnResetAgegroupActionPerformed

    private void btnAddNannyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddNannyActionPerformed
        try {
            // TODO add your handling code here:
            AddNannyDlg addna = new AddNannyDlg(main, true);
            addna.setVisible(true);
            na = buz.findNanny();
            loadtableNanny();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }

    }//GEN-LAST:event_btnAddNannyActionPerformed

    private void btnEditNannyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditNannyActionPerformed
        try {
            // TODO add your handling code here:
            EditNannyDlg editna = new EditNannyDlg(main, true);
            index = this.tbNanny.getSelectedRow();
            if (index == -1) {
                JOptionPane.showMessageDialog(this, "Please choose a Nanny!");
                return;
            }
            index = this.tbNanny.getSelectedRow();
            nanny = na.get(index);
            editna.txtNannyID.setText(String.valueOf(nanny.getNannyID()));
            editna.txtClassID.setText(String.valueOf(nanny.getClassID()));
            editna.txtName.setText(nanny.getFullName());
            editna.txtAddress.setText(nanny.getAddress());
            editna.txtEmail.setText(nanny.getEmail());
            editna.txtPhone.setText(nanny.getPhone());
            editna.txtCharge.setText(String.valueOf(nanny.getCharge()));
            editna.txtWorkingHours.setText(String.valueOf(nanny.getWorkinghours()));
            editna.cbSex.setSelectedItem(nanny.getSex());
            editna.lbImage.setIcon(new ImageIcon(url + nanny.getPathImage()));
            editna.dcBirthday.setDate(nanny.getBirthday());
            editna.dcStartDate.setDate(nanny.getStartDay());
            editna.setVisible(true);
            na = buz.findNanny();
            loadtableNanny();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnEditNannyActionPerformed

    private void btnAddChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddChildActionPerformed
        try {
            // TODO add your handling code here:
            AddChildDlg addch = new AddChildDlg(main, true);
            addch.setVisible(true);
            ch = buz.findChild();
            loadtableChild();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnAddChildActionPerformed

    private void btnEditChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditChildActionPerformed
        try {
            // TODO add your handling code here:
            EditChildDlg editch = new EditChildDlg(main, true);
            index = this.tbChild.getSelectedRow();
            if (index == -1) {
                JOptionPane.showMessageDialog(this, "Please choose a Child!");
                return;
            }
            index = this.tbChild.getSelectedRow();
            child = ch.get(index);
            editch.txtChildID.setText(String.valueOf(child.getChildID()));
            editch.txtLastName.setText(child.getLastName());
            editch.txtFirstName.setText(child.getFirstName());
            editch.txtAddress.setText(child.getAddress());
            editch.dcBirthday.setDate(child.getBirthday());
            editch.lbImage.setText(child.getPathImage());
            editch.txtClassID.setText(String.valueOf(child.getClassID()));
            editch.txtCurrentmedication.setText(child.getCurrentMedication());
            editch.cbSex.setSelectedItem(child.getSex());
            editch.lbImage.setIcon(new ImageIcon(url + child.getPathImage()));
            editch.txtDoctorName.setText(child.getDoctorName());
            editch.txtDoctorPhone.setText(child.getDoctorPhone());
            editch.txtParentName.setText(child.getParentName());
            editch.txtPastIllness.setText(child.getPasrIllness());
            editch.txtParentEmail.setText(child.getParentEmail());
            editch.txtParentPhone.setText(child.getParentPhone());
            editch.txtWorkNumber.setText(child.getParentWorkNumber());
            editch.txtNextOfKinContact.setText(child.getNextOfKinContact());
            editch.dcDateReceived.setDate(child.getDateReceived());
            editch.dcRegistrationDate.setDate(child.getRegistrationDate());
            editch.setVisible(true);
            ch = buz.findChild();
            loadtableChild();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnEditChildActionPerformed

    private void btnEditActivitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActivitiesActionPerformed
        // TODO add your handling code here:
        index = this.tbActivities.getSelectedRow();
        if (index == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Activities!");
            return;
        }
        index = this.tbActivities.getSelectedRow();
        activities = act.get(index);
        txtActivitiesName.setText(activities.getName());
        txtActivitiesFees.setText(String.valueOf(activities.getFees()));
        txtaNoteActivities.setText(activities.getNote());
    }//GEN-LAST:event_btnEditActivitiesActionPerformed

    private void btnSaveActivitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActivitiesActionPerformed
        try {
            Activities ac = new Activities();
            ac.setActiveID(activities.getActiveID());
            ac.setName(txtActivitiesName.getText());
            ac.setFees(Float.parseFloat(txtActivitiesFees.getText()));
            ac.setNote(txtaNoteActivities.getText());
            if (ac.getActiveID() == -1) {
                try {
                    if (txtActivitiesName.getText().equals("")) {
                        JOptionPane.showMessageDialog(this, "Please enter Name.");
                        txtActivitiesName.requestFocus();
                        return;
                    }
                    if (txtActivitiesFees.getText().equals("")) {
                        JOptionPane.showMessageDialog(this, "Please enter Fees.");
                        txtActivitiesFees.requestFocus();
                        return;
                    }
                    if (buz.createActivitiess(ac)) {
                        JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                    } else {
                        JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                    }
                } catch (IOException ex) {
                    Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                try {
                    if (buz.storeActivities(ac)) {
                        JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                    } else {
                        JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                    }
                } catch (IOException ex) {
                    Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            act = buz.findlActivities();
            loadtableActivities();
            resetValueActivities();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSaveActivitiesActionPerformed

    private void btnResetActivitieslActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResetActivitieslActionPerformed
        // TODO add your handling code here:
        resetValueActivities();
    }//GEN-LAST:event_btnResetActivitieslActionPerformed

    private void btnEditclassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditclassActionPerformed
        // TODO add your handling code here:
        index = this.tbClass.getSelectedRow();
        if (index == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Class!");
            return;
        }
        classChild = cl.get(index);
        txtClassName.setText(classChild.getName());
        txtSetAgegroupIDOfClass.setText(String.valueOf(classChild.getAgeGroupID()));
        txtaNoteClass.setText(classChild.getNote());

    }//GEN-LAST:event_btnEditclassActionPerformed

    private void btnSaveClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveClassActionPerformed
        try {
            // TODO add your handling code here:
            ClassChild cls = new ClassChild();
            cls.setClassID(classChild.getClassID());
            cls.setName(txtClassName.getText());
            cls.setAgeGroupID(Integer.parseInt(txtSetAgegroupIDOfClass.getText()));
            cls.setNote(txtaNoteClass.getText());
            if (cls.getClassID() == -1) {
                try {
                    if (txtSetAgegroupIDOfClass.getText().equals("")) {
                        JOptionPane.showMessageDialog(this, "Please enter Agegroup ID");
                        txtSetAgegroupIDOfClass.requestFocus();
                        return;
                    }
                    if (txtClassName.getText().equals("")) {
                        JOptionPane.showMessageDialog(this, "Please enter Class Name");
                        txtClassName.requestFocus();
                        return;
                    }
                    if (buz.createClass(cls)) {
                        JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                    } else {
                        JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                    }
                } catch (IOException ex) {
                    Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                if (buz.storeClass(cls)) {
                    JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                } else {
                    JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                }
            }
            cl = buz.findClass();
            loadtableClass();
            resetValueClass();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSaveClassActionPerformed

    private void btnResetClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResetClassActionPerformed
        // TODO add your handling code here:
        resetValueClass();
    }//GEN-LAST:event_btnResetClassActionPerformed

    private void jCalendar7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jCalendar7MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jCalendar7MouseClicked

    private void itmLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmLoginActionPerformed
        // TODO add your handling code here:
        LoginDlg login = new LoginDlg(this, true);
        login.setVisible(true);
    }//GEN-LAST:event_itmLoginActionPerformed

    private void itmManangementStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManangementStaffActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(0);
    }//GEN-LAST:event_itmManangementStaffActionPerformed

    private void itmManagementChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagementChildActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(1);
    }//GEN-LAST:event_itmManagementChildActionPerformed

    private void itmManagementNannyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagementNannyActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(2);
    }//GEN-LAST:event_itmManagementNannyActionPerformed

    private void itmManagementClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagementClassActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(3);
    }//GEN-LAST:event_itmManagementClassActionPerformed

    private void itmManagamentAgegroupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagamentAgegroupActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(4);
    }//GEN-LAST:event_itmManagamentAgegroupActionPerformed

    private void itmManagementActivitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagementActivitiesActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(5);
    }//GEN-LAST:event_itmManagementActivitiesActionPerformed

    private void itmManagementReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmManagementReportActionPerformed
        // TODO add your handling code here:
        tbpContent.setSelectedIndex(6);
    }//GEN-LAST:event_itmManagementReportActionPerformed

    private void btnSetAgegroupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSetAgegroupActionPerformed
        try {
            // TODO add your handling code here:
            ViewAgegroupDlg viewag = new ViewAgegroupDlg(this, true);
            viewag.setVisible(true);
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSetAgegroupActionPerformed

    private void btnDetailChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDetailChildActionPerformed
        // TODO add your handling code here:
        DetailChildDlg detail = new DetailChildDlg(main, true);
        index = this.tbChild.getSelectedRow();
        if (index == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Child!");
            return;
        }
        index = this.tbChild.getSelectedRow();
        child = ch.get(index);
        detail.txtLastName.setText(child.getLastName());
        detail.txtFirstName.setText(child.getFirstName());
        detail.txtAddress.setText(child.getAddress());
        detail.txtBirthday.setText(String.valueOf(child.getBirthday()));
        detail.lbImage.setText(child.getPathImage());
        detail.txtClassID.setText(String.valueOf(child.getClassID()));
        detail.txtCurrentmedication.setText(child.getCurrentMedication());
        detail.txtSex.setText(child.getSex());
        detail.lbImage.setIcon(new ImageIcon(url + child.getPathImage()));
        detail.txtDoctorName.setText(child.getDoctorName());
        detail.txtDoctorPhone.setText(child.getDoctorPhone());
        detail.txtParentName.setText(child.getParentName());
        detail.txtPastIllness.setText(child.getPasrIllness());
        detail.txtparentEmail.setText(child.getParentEmail());
        detail.txtParentPhone.setText(child.getParentPhone());
        detail.txtWorkNumber.setText(child.getParentWorkNumber());
        detail.txtNextOfKinContact.setText(child.getNextOfKinContact());
        detail.txtDateReceived.setText(String.valueOf(child.getDateReceived()));
        detail.txtRegistrationDate.setText(String.valueOf(child.getRegistrationDate()));
        detail.setVisible(true);
    }//GEN-LAST:event_btnDetailChildActionPerformed

    private void tbActivitiesMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbActivitiesMouseReleased
        index = tbActivities.getSelectedRow();
        setValueActivities(act.get(index));
    }//GEN-LAST:event_tbActivitiesMouseReleased

    private void btnDeleteActivitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActivitiesActionPerformed
        // TODO add your handling code here:
        if (this.tbActivities.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Activities!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            try {
                if (buz.removeActivities(id)) {
                    try {
                        JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                        act = buz.findlActivities();
                        loadtableActivities();
                    } catch (IOException ex) {
                        Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                    }
                } else {
                    JOptionPane.showMessageDialog(this, buz.acdao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_btnDeleteActivitiesActionPerformed

    private void tbAgegroupMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbAgegroupMouseReleased
        try {
            // TODO add your handling code here:
            index = tbAgegroup.getSelectedRow();
            ch = buz.findByAllIDChild(buz.readByIDAge(age.get(index).getAgeGroupID()).getClassID());
            loadtableChildAgegroup();
            childSize = ch.size();
            setValueAgegroup(age.get(index));
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_tbAgegroupMouseReleased
    private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed
        // TODO add your handling code here:
        if (this.tbAgegroup.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Agegroup!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            try {
                if (buz.removeAgegroup(idAge)) {
                    JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                    age = buz.findAgegroup();
                    loadtableAgegroup();
                } else {
                    JOptionPane.showMessageDialog(this, buz.agedao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_btnDeleteActionPerformed

    private void btnDeleteClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteClassActionPerformed
        // TODO add your handling code here:
        if (this.tbClass.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Class!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            try {
                if (buz.removeClass(idCl)) {
                    JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                    cl = buz.findClass();
                    loadtableClass();
                } else {
                    JOptionPane.showMessageDialog(this, buz.cldao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_btnDeleteClassActionPerformed

    private void tbClassMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbClassMouseReleased
        try {
            // TODO add your handling code here:
            index = tbClass.getSelectedRow();
            ch = buz.findByAllIDChild(cl.get(index).getClassID());
            loadtableChildClass();
            childSize = ch.size();
            setValueClass(cl.get(index));
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_tbClassMouseReleased

    private void tbNannyMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbNannyMouseReleased
        try {
            // TODO add your handling code here:
            index = tbNanny.getSelectedRow();
            setValueNanny(na.get(index));
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_tbNannyMouseReleased

    private void btnDeleteNannyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteNannyActionPerformed
        // TODO add your handling code here:
        if (this.tbNanny.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Nanny!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            try {
                if (buz.removeNanny(idNa)) {
                    try {
                        JOptionPane.showMessageDialog(this, buz.nadao.getLastError());
                        na = buz.findNanny();
                        loadtableNanny();
                    } catch (IOException ex) {
                        Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                    }
                } else {
                    JOptionPane.showMessageDialog(this, buz.nadao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

    }//GEN-LAST:event_btnDeleteNannyActionPerformed

    private void btnSearchActiveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActiveActionPerformed
        try {
            if (txtSearchActive.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            act = buz.findlActivities(txtSearchActive.getText());
            loadtableActivities();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchActiveActionPerformed

    private void btnSearchAgegroupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchAgegroupActionPerformed
        try {
            if (txtSearchAgegroup.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            age = buz.findAgegroup(txtSearchAgegroup.getText());
            loadtableAgegroup();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchAgegroupActionPerformed

    private void tbChildMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbChildMouseReleased
        try {
            // TODO add your handling code here:
            index = tbChild.getSelectedRow();
            setValueChild(ch.get(index));
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_tbChildMouseReleased

    private void btnDeleteChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteChildActionPerformed
        // TODO add your handling code here:
        if (this.tbChild.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Child!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            try {
                if (buz.removeChild(idCh)) {
                    try {
                        JOptionPane.showMessageDialog(this, buz.chdao.getLastError());
                        ch = buz.findChild();
                        loadtableChild();
                    } catch (IOException ex) {
                        Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                    }
                } else {
                    JOptionPane.showMessageDialog(this, buz.chdao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_btnDeleteChildActionPerformed

    private void tbStaffMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbStaffMouseReleased
        // TODO add your handling code here:
        index = tbStaff.getSelectedRow();
        setValueStaff(st.get(index));
    }//GEN-LAST:event_tbStaffMouseReleased

    private void btnDeleteStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteStaffActionPerformed
        // TODO add your handling code here:
        if (this.tbStaff.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(this, "Please choose a Staff!");
            return;
        }
        comfirm = JOptionPane.showConfirmDialog(this, "Do you want to delete?", "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null);
        if (comfirm == JOptionPane.YES_OPTION) {
            if (userName.trim().equalsIgnoreCase("admin")) {
                JOptionPane.showMessageDialog(this, "User Name Admin not Delete !");
            } else try {
                if (buz.removeStaff(idSt, userName)) {
                    try {
                        JOptionPane.showMessageDialog(this, buz.stdao.getLastError());
                        st = buz.findStaff();
                        loadtableStaff();
                    } catch (IOException ex) {
                        Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                    }
                } else {
                    JOptionPane.showMessageDialog(this, buz.stdao.getLastError());
                }
            } catch (IOException ex) {
                Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_btnDeleteStaffActionPerformed

    private void txtSearchActiveKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchActiveKeyPressed
        try {
            // TODO add your handling code here:
            act = buz.findlActivities(txtSearchActive.getText());
            loadtableActivities();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchActiveKeyPressed

    private void txtSearchAgegroupKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchAgegroupKeyPressed
        try {
            // TODO add your handling code here:
            age = buz.findAgegroup(txtSearchAgegroup.getText());
            loadtableAgegroup();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchAgegroupKeyPressed

    private void txtSearchClassKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchClassKeyPressed
        try {
            // TODO add your handling code here:
            cl = buz.findClass(txtSearchClass.getText());
            loadtableClass();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchClassKeyPressed

    private void btnSearchNannyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchNannyActionPerformed
        try {
            // TODO add your handling code here:
            if (txtSearchNanny.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            na = buz.findByNameNanny(txtSearchNanny.getText());
            loadtableNanny();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchNannyActionPerformed

    private void btnSearchClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchClassActionPerformed
        try {
            // TODO add your handling code here:
            if (txtSearchClass.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            cl = buz.findClass(txtSearchClass.getText());
            loadtableClass();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchClassActionPerformed

    private void txtSearchNannyKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchNannyKeyPressed
        try {
            // TODO add your handling code here:
            na = buz.findByNameNanny(txtSearchNanny.getText());
            loadtableNanny();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchNannyKeyPressed

    private void txtSearchChildKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchChildKeyPressed
        try {
            // TODO add your handling code here:
            ch = buz.findChild(txtSearchChild.getText());
            loadtableChild();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchChildKeyPressed

    private void btnSearchChildActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchChildActionPerformed
        try {
            // TODO add your handling code here:
            if (txtSearchChild.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            ch = buz.findChild(txtSearchChild.getText());
            loadtableChild();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchChildActionPerformed

    private void btnSearchStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchStaffActionPerformed
        try {
            // TODO add your handling code here:
            if (txtSearchStaff.getText().equals("")) {
                JOptionPane.showMessageDialog(this, "Please enter name.");
            }
            st = buz.findByNameStaff(txtSearchStaff.getText());
            loadtableStaff();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSearchStaffActionPerformed

    private void txtSearchStaffKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchStaffKeyPressed
        try {
            // TODO add your handling code here:
            st = buz.findByNameStaff(txtSearchStaff.getText());
            loadtableStaff();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_txtSearchStaffKeyPressed

    private void btnSetActActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSetActActionPerformed
        try {
            // TODO add your handling code here:
            ViewActivitiesDlg viewact = new ViewActivitiesDlg(main, true);
            viewact.setVisible(true);
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnSetActActionPerformed

    private void itmEditInformationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmEditInformationActionPerformed
        try {
            // TODO add your handling code here:
            EditInformationDlg editAc = new EditInformationDlg(main, true);
            editAc.txtUserName.setText(lbOnline.getText());
            editAc.txtName.setText(buz.findByAcc(lbOnline.getText()).getFullName());
            editAc.txtAddress.setText(buz.findByAcc(lbOnline.getText()).getAddress());
            editAc.txtEmail.setText(buz.findByAcc(lbOnline.getText()).getEmail());
            editAc.txtPhone.setText(buz.findByAcc(lbOnline.getText()).getPhone());
            editAc.setVisible(true);
            st = buz.findStaff();
            loadtableStaff();
        } catch (IOException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_itmEditInformationActionPerformed

    private void mnSystemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSystemActionPerformed

    }//GEN-LAST:event_mnSystemActionPerformed

    private void itmDataConnectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmDataConnectionActionPerformed
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            ConfigConnectionDatadlg config = new ConfigConnectionDatadlg(this, true);
            config.setVisible(true);
           main.dispose();
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_itmDataConnectionActionPerformed
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                try {
                    MainFrm main = new MainFrm();
                    // setExtendedState(MAXIMIZED_BOTH);
                    main.setVisible(true);
                } catch (IOException ex) {
                    Logger.getLogger(MainFrm.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PnlActivities;
    private javax.swing.JPanel PnlAgegroup;
    private javax.swing.JPanel PnlChild;
    protected javax.swing.JPanel PnlClass;
    private javax.swing.JPanel PnlNanny;
    private javax.swing.JPanel PnlStaff;
    protected javax.swing.JButton btnAddChild;
    protected javax.swing.JButton btnAddNanny;
    protected javax.swing.JButton btnAddStaff;
    protected javax.swing.JButton btnDelete;
    protected javax.swing.JButton btnDeleteActivities;
    protected javax.swing.JButton btnDeleteChild;
    protected javax.swing.JButton btnDeleteClass;
    protected javax.swing.JButton btnDeleteNanny;
    protected javax.swing.JButton btnDeleteStaff;
    protected javax.swing.JButton btnDetailChild;
    protected javax.swing.JButton btnEdit;
    protected javax.swing.JButton btnEditActivities;
    protected javax.swing.JButton btnEditChild;
    protected javax.swing.JButton btnEditNanny;
    protected javax.swing.JButton btnEditStaff;
    protected javax.swing.JButton btnEditclass;
    private javax.swing.JButton btnResetActivitiesl;
    private javax.swing.JButton btnResetAgegroup;
    private javax.swing.JButton btnResetClass;
    protected javax.swing.JButton btnSaveActivities;
    protected javax.swing.JButton btnSaveAgegroup;
    protected javax.swing.JButton btnSaveClass;
    private javax.swing.JButton btnSearchActive;
    private javax.swing.JButton btnSearchAgegroup;
    private javax.swing.JButton btnSearchChild;
    private javax.swing.JButton btnSearchClass;
    private javax.swing.JButton btnSearchNanny;
    private javax.swing.JButton btnSearchStaff;
    protected javax.swing.JButton btnSetAct;
    private javax.swing.JButton btnSetAgegroup;
    private javax.swing.JMenu helpMn;
    private javax.swing.JMenuItem itmAbout;
    protected javax.swing.JMenuItem itmChangePass;
    protected javax.swing.JMenuItem itmDataConnection;
    protected javax.swing.JMenuItem itmEditInformation;
    private javax.swing.JMenuItem itmExit;
    private javax.swing.JMenuItem itmHelp;
    protected javax.swing.JMenuItem itmLogin;
    private javax.swing.JMenuItem itmManagamentAgegroup;
    private javax.swing.JMenuItem itmManagementActivities;
    private javax.swing.JMenuItem itmManagementChild;
    private javax.swing.JMenuItem itmManagementClass;
    private javax.swing.JMenuItem itmManagementNanny;
    private javax.swing.JMenuItem itmManagementReport;
    private javax.swing.JMenuItem itmManangementStaff;
    private com.toedter.calendar.JCalendar jCalendar2;
    private com.toedter.calendar.JCalendar jCalendar4;
    private com.toedter.calendar.JCalendar jCalendar5;
    private com.toedter.calendar.JCalendar jCalendar6;
    private com.toedter.calendar.JCalendar jCalendar7;
    private com.toedter.calendar.JCalendar jCalendar8;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel127;
    private javax.swing.JLabel jLabel128;
    public javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel130;
    public javax.swing.JLabel jLabel14;
    public javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    public javax.swing.JLabel jLabel20;
    public javax.swing.JLabel jLabel21;
    public javax.swing.JLabel jLabel22;
    public javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel28;
    public javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    public javax.swing.JLabel jLabel48;
    public javax.swing.JLabel jLabel49;
    public javax.swing.JLabel jLabel50;
    public javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    public javax.swing.JLabel jLabel6;
    public javax.swing.JLabel jLabel60;
    public javax.swing.JLabel jLabel61;
    public javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    public javax.swing.JLabel jLabel78;
    public javax.swing.JLabel jLabel79;
    public javax.swing.JLabel jLabel8;
    public javax.swing.JLabel jLabel80;
    public javax.swing.JLabel jLabel81;
    public javax.swing.JLabel jLabel88;
    public javax.swing.JLabel jLabel90;
    public javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel94;
    public javax.swing.JLabel jLabel96;
    public javax.swing.JLabel jLabel97;
    public javax.swing.JLabel jLabel98;
    public javax.swing.JLabel jLabel99;
    private javax.swing.JMenuBar jMenuBar1;
    protected javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    protected javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    public javax.swing.JLabel lbActivitiesChild;
    public javax.swing.JLabel lbActivitiesFees;
    public javax.swing.JLabel lbActivitiesID;
    public javax.swing.JLabel lbActivitiesName;
    public javax.swing.JLabel lbActivitiesNote;
    public javax.swing.JLabel lbAddressChild;
    public javax.swing.JLabel lbAddressNanny;
    public javax.swing.JLabel lbAddressStaff;
    public javax.swing.JLabel lbAgegroup;
    public javax.swing.JLabel lbAgegroupChildN;
    public javax.swing.JLabel lbAgegroupFees;
    public javax.swing.JLabel lbAgegroupID;
    public javax.swing.JLabel lbAgegroupIDCl;
    public javax.swing.JLabel lbAgegroupNote;
    public javax.swing.JLabel lbBirthdayChild;
    public javax.swing.JLabel lbBirthdayNanny;
    public javax.swing.JLabel lbBirthdayStaff;
    public javax.swing.JLabel lbChargeNanny;
    public javax.swing.JLabel lbChildID;
    public javax.swing.JLabel lbClassChildNumber;
    public javax.swing.JLabel lbClassID;
    public javax.swing.JLabel lbClassName;
    public javax.swing.JLabel lbClassNote;
    public javax.swing.JLabel lbClassroomChild;
    public javax.swing.JLabel lbEmailNanny;
    public javax.swing.JLabel lbEmailStaff;
    public javax.swing.JLabel lbEndDateStaff;
    public javax.swing.JLabel lbFisrtName;
    public javax.swing.JLabel lbImageChild;
    public javax.swing.JLabel lbImageNanny;
    public javax.swing.JLabel lbImageStaff;
    public javax.swing.JLabel lbLastName;
    public javax.swing.JLabel lbNameNanny;
    public javax.swing.JLabel lbNaneStaff;
    protected javax.swing.JLabel lbOnline;
    public javax.swing.JLabel lbPhoneNanny;
    public javax.swing.JLabel lbPhoneStaff;
    public javax.swing.JLabel lbPosition;
    public javax.swing.JLabel lbRegistrationDate;
    public javax.swing.JLabel lbSexChild;
    public javax.swing.JLabel lbSexNanny;
    public javax.swing.JLabel lbSexStaff;
    public javax.swing.JLabel lbStartDateStaff;
    public javax.swing.JLabel lbStartdate;
    protected javax.swing.JLabel lbThu;
    public javax.swing.JLabel lbUserName;
    public javax.swing.JLabel lbWorkinghours;
    public javax.swing.JLabel lbclassrom;
    private javax.swing.JPanel leftPnl;
    private javax.swing.JMenu mnManagement;
    private javax.swing.JMenu mnSystem;
    private javax.swing.JScrollPane scrActivities;
    private javax.swing.JScrollPane scrActivitiesChild;
    private javax.swing.JScrollPane scrAgegroupChild;
    private javax.swing.JScrollPane scrChild;
    private javax.swing.JScrollPane scrChildClass;
    private javax.swing.JScrollPane scrClass;
    private javax.swing.JScrollPane scrNanny;
    private javax.swing.JScrollPane scrStaff;
    private javax.swing.JScrollPane srcAgegroup;
    private javax.swing.JScrollPane srcChildActivities;
    public javax.swing.JTable tbActivities;
    private javax.swing.JTable tbActivitiesChild;
    public javax.swing.JTable tbAgegroup;
    private javax.swing.JTable tbAgegroupChild;
    public javax.swing.JTable tbChild;
    private javax.swing.JTable tbChildActivities;
    private javax.swing.JTable tbChildClass;
    public javax.swing.JTable tbClass;
    public javax.swing.JTable tbNanny;
    public javax.swing.JTable tbStaff;
    public javax.swing.JTabbedPane tbpContent;
    private javax.swing.JTextField txtActivitiesFees;
    private javax.swing.JTextField txtActivitiesName;
    private javax.swing.JTextField txtAgegroupFees;
    private javax.swing.JTextField txtAgegroupName;
    private javax.swing.JTextField txtClassName;
    private javax.swing.JTextField txtSearchActive;
    private javax.swing.JTextField txtSearchAgegroup;
    private javax.swing.JTextField txtSearchChild;
    private javax.swing.JTextField txtSearchClass;
    private javax.swing.JTextField txtSearchNanny;
    private javax.swing.JTextField txtSearchStaff;
    protected javax.swing.JTextField txtSetAgegroupIDOfClass;
    public javax.swing.JTextArea txtaNoteActivities;
    public javax.swing.JTextArea txtaNoteAgegroup;
    public javax.swing.JTextArea txtaNoteClass;
    // End of variables declaration//GEN-END:variables
}
